<?php
/*
功能节点查询方法
addPoint($point , $ablitity) 节点、功能 如果数据表中已经有此功能则返回id，如果没有添加后返回id
*/

namespace Home\Model;
use Think\Model;
class PointModel extends Model{



  public function addPoint($point , $ablitity){
    $po = $this->where(array('point'=>$point))->find();
    if($po){
      return $po['point_id'];
    }
    else{
      $data['point'] = $point;
      $data['able'] = $ablitity;
      $ad = $this -> add($data);
      return $ad;
    }
  }













}
